package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the TEAM database table.
 * 
 */
@Entity
@NamedQuery(name="Team.findAll", query="SELECT t FROM Team t")
public class Team implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="TEAM_TEAMID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="TEAM_TEAMID_GENERATOR")
	@Column(name="TEAM_ID")
	private long teamId;

	@Column(name="TEAM_CONTAIN")
	private BigDecimal teamContain;

	@Column(name="TEAM_ENDUPDATE")
	private Timestamp teamEndupdate;

	@Column(name="TEAM_FOUNDDATE")
	private Timestamp teamFounddate;

	@Column(name="TEAM_LNVALID")
	private Timestamp teamLnvalid;

	@Column(name="TEAM_NAME")
	private String teamName;

	@Column(name="TEAM_PERSON")
	private String teamPerson;

	@Column(name="TEAM_REMARKS")
	private String teamRemarks;

	@Column(name="TEAM_STATE")
	private BigDecimal teamState;

	@Column(name="TEAM_TAKEEFFECT")
	private Timestamp teamTakeeffect;

	@Column(name="TEAM_UPDATE")
	private Timestamp teamUpdate;

	//bi-directional many-to-one association to GerenLxl
	@OneToMany(mappedBy="team")
	@JSONField(serialize=false)
	private List<GerenLxl> gerenLxls;

	//bi-directional many-to-one association to Paibanplan
	@OneToMany(mappedBy="team")
	@JSONField(serialize=false)
	private List<Paibanplan> paibanplans;

	//bi-directional many-to-one association to DefinitionDept
	@ManyToOne
	@JoinColumn(name="DEFIDE_ID")
	private DefinitionDept definitionDept;

	public Team() {
	}

	public long getTeamId() {
		return this.teamId;
	}

	public void setTeamId(long teamId) {
		this.teamId = teamId;
	}

	public BigDecimal getTeamContain() {
		return this.teamContain;
	}

	public void setTeamContain(BigDecimal teamContain) {
		this.teamContain = teamContain;
	}

	public Timestamp getTeamEndupdate() {
		return this.teamEndupdate;
	}

	public void setTeamEndupdate(Timestamp teamEndupdate) {
		this.teamEndupdate = teamEndupdate;
	}

	public Timestamp getTeamFounddate() {
		return this.teamFounddate;
	}

	public void setTeamFounddate(Timestamp teamFounddate) {
		this.teamFounddate = teamFounddate;
	}

	public Timestamp getTeamLnvalid() {
		return this.teamLnvalid;
	}

	public void setTeamLnvalid(Timestamp teamLnvalid) {
		this.teamLnvalid = teamLnvalid;
	}

	public String getTeamName() {
		return this.teamName;
	}

	public void setTeamName(String teamName) {
		this.teamName = teamName;
	}

	public String getTeamPerson() {
		return this.teamPerson;
	}

	public void setTeamPerson(String teamPerson) {
		this.teamPerson = teamPerson;
	}

	public String getTeamRemarks() {
		return this.teamRemarks;
	}

	public void setTeamRemarks(String teamRemarks) {
		this.teamRemarks = teamRemarks;
	}

	public BigDecimal getTeamState() {
		return this.teamState;
	}

	public void setTeamState(BigDecimal teamState) {
		this.teamState = teamState;
	}

	public Timestamp getTeamTakeeffect() {
		return this.teamTakeeffect;
	}

	public void setTeamTakeeffect(Timestamp teamTakeeffect) {
		this.teamTakeeffect = teamTakeeffect;
	}

	public Timestamp getTeamUpdate() {
		return this.teamUpdate;
	}

	public void setTeamUpdate(Timestamp teamUpdate) {
		this.teamUpdate = teamUpdate;
	}

	public List<GerenLxl> getGerenLxls() {
		return this.gerenLxls;
	}

	public void setGerenLxls(List<GerenLxl> gerenLxls) {
		this.gerenLxls = gerenLxls;
	}

	public GerenLxl addGerenLxl(GerenLxl gerenLxl) {
		getGerenLxls().add(gerenLxl);
		gerenLxl.setTeam(this);

		return gerenLxl;
	}

	public GerenLxl removeGerenLxl(GerenLxl gerenLxl) {
		getGerenLxls().remove(gerenLxl);
		gerenLxl.setTeam(null);

		return gerenLxl;
	}

	public List<Paibanplan> getPaibanplans() {
		return this.paibanplans;
	}

	public void setPaibanplans(List<Paibanplan> paibanplans) {
		this.paibanplans = paibanplans;
	}

	public Paibanplan addPaibanplan(Paibanplan paibanplan) {
		getPaibanplans().add(paibanplan);
		paibanplan.setTeam(this);

		return paibanplan;
	}

	public Paibanplan removePaibanplan(Paibanplan paibanplan) {
		getPaibanplans().remove(paibanplan);
		paibanplan.setTeam(null);

		return paibanplan;
	}

	public DefinitionDept getDefinitionDept() {
		return this.definitionDept;
	}

	public void setDefinitionDept(DefinitionDept definitionDept) {
		this.definitionDept = definitionDept;
	}

}